#!/usr/bin/gnuplot -persist

# $Id$
# Gnuplot script created by stpl 1875 2006-08-21 17:29:27Z sunny

!date2iso hosts_in_blacklist_hourly_sample.txt | cut -c5- | egrep '^[0-9]' >hosts.dat
set encoding iso_8859_1
set xdata time
set grid
set timefmt "%Y-%m-%d %H:%M:%S"
set format x "%Y-%m-%d"
set terminal png size 800 600
set output "hosts.png"
plot \
"hosts.dat" using 1:2 title " " with line 1, \
"hosts.dat" using 1:2 smooth bezier title " " with line -1

!date2iso hosts_in_blacklist_hourly_sample.txt | cut -c16- | egrep '^[0-9]' | sort >hosts.timeonly.dat
set encoding iso_8859_1
set xdata time
set grid
set timefmt "%H:%M:%S"
set format x "%Y-%m-%d"
set output "hosts-timeonly.png"
plot \
"hosts.timeonly.dat" using 1:2 title " " with line 1, \
"hosts.timeonly.dat" using 1:2 smooth bezier title " " with line -1

set encoding iso_8859_1
set grid
set output "connections.png"
set logscale y
plot \
"c.dat" using 2:1 title " " with line 1, \
"c.dat" using 1:2 smooth bezier title " " with line -1

# vim: set sw=2 sts=0 ts=2 et :
